﻿<UserControl x:Class="Unscrambler.Views.CorrectWordView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:localViews="clr-namespace:Unscrambler.Views"
             mc:Ignorable="d" 
            Height="600" Width="900">
    <UserControl.Resources>
        <Style TargetType="{x:Type TextBlock}">
            <Setter Property="FontSize" Value="28"/>
            <Setter Property="HorizontalAlignment" Value="Center"/>
        </Style>
        <Style TargetType="{x:Type localViews:CorrectWordView}">
            <Style.Triggers>
                <DataTrigger Binding="{Binding Path=IsCurrentWordCorrect}" Value="True">
                    <Setter Property="Visibility" Value="Visible"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding Path=IsCurrentWordCorrect}" Value="False">
                    <Setter Property="Visibility" Value="Collapsed"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding Path=IsGameOver}" Value="True">
                    <Setter Property="Visibility" Value="Collapsed"/>
                </DataTrigger>

            </Style.Triggers>
        </Style>
    </UserControl.Resources>
    <StackPanel Margin="0,200,0,0">
        <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
            <TextBlock Text="You correctly unscrambled the word "/>
            <TextBlock Text="{Binding Path=CurrentWord,Mode=OneWay}" FontWeight="Bold"/>
        </StackPanel>
        <StackPanel VerticalAlignment="Center">
            <Button Content="Continue" HorizontalAlignment="Center" Width="150" Height="80"  Command="{Binding Path=NewWordCommand}" />
        </StackPanel>

    </StackPanel>
</UserControl>
